﻿@using CarCareTracker.Helper
@inject IConfigHelper config
@inject ITranslationHelper translator
@model InspectionRecordTemplateFieldOption
@{
    var userConfig = config.GetUserConfig(User);
    var userLanguage = userConfig.UserLanguage;
}
<div data-type="fieldOption" class="d-flex justify-content-between align-items-center mt-2">
    <input type="text" data-type="fieldOptionText" class="form-control" value="@Model.Description">
    <div class="ms-2 form-check form-check-inline">
        <input class="form-check-input" data-type="fieldOptionIsFail" type="checkbox" role="switch" @(Model.IsFail ? "checked" : "")>
        <label class="form-check-label" onclick="stretchedLinkClick(this)">@translator.Translate(userLanguage, "Fail")</label>
    </div>
    <button type="button" class="btn btn-outline-danger btn-sm" onclick="deleteInspectionRecordFieldOption(this)"><i class="bi bi-trash"></i></button>
</div>